﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using Beaker.FileSystem;

namespace OpenCube.IO.Overload
{
	public sealed class OverloadingFileSystemFactory
		: IOverloadingFileSystemFactory
	{
		public IFileSystem Create(IEnumerable<IFolder> folders)
		{
			Contract.Requires<ArgumentNullException>(folders != null);
			Contract.Requires<ArgumentException>(folders.Any());

			return new OverloadingFileSystem(folders);
		}
	}
}